#include <cstdio>
#include <iostream>
#include <algorithm>
using namespace std;
int a[110];
int main()
{
    freopen("coinn.in","r",stdin);
     freopen("coinn.out","w",stdout);
	 int n;
	 cin>>n;
	 cout<<n;
	 for(int i=1;i<=n;i++)
	 {
		 for(int j=1;j<=n;j++)
		 {
			 if(i==j)cout<<abs(a[j]);
			 else cout<<abs(a[j]=!a[j]);
		 }
		 cout<<endl;
	 }
    fclose(stdin);
	 fclose(stdout);
}
